class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.p: D = None
        self.q: D = None
        self.x: D = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.q: G = None
        self.w: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.z: C = None
        self.q: E = None
        self.v: C = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.txt = txt

b = A("b")
g = B("g")
m = C("m")
k = D("k")
i = E("i")
h = F("h")
l = G("l")
f = E("f")
c = F("c")
a = B("a")

b.u = m
b.t = m
b.r = m
b.s = l
b.p = k
b.q = k
b.x = k
g.t = m
g.q = a
g.p = k
m.x = k
m.y = b
m.w = h
m.r = l
k.v = m
k.s = f
k.q = l
k.w = a
k.x = i
i.t = m
h.r = k
h.p = i
h.q = i
h.u = i
h.z = m
h.v = m
h.x = c
l.y = f
l.v = m
f.t = m
c.r = k
c.p = f
c.z = m
c.v = m
c.q = i
c.u = i
c.x = h
a.t = m
a.q = g
a.p = k
assert k.s.t.w.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.p: D = None
        self.q: D = None
        self.x: D = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: B = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: A = None
        self.w: F = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: E = None
        self.q: G = None
        self.w: B = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.z: C = None
        self.q: E = None
        self.v: C = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: C = None
        self.txt = txt

b = A("b")
g = B("g")
m = C("m")
k = D("k")
i = E("i")
h = F("h")
l = G("l")
f = E("f")
c = F("c")
a = B("a")

b.u = m
b.t = m
b.r = m
b.s = l
b.p = k
b.q = k
b.x = k
g.t = m
g.q = a
g.p = k
m.x = k
m.y = b
m.w = h
m.r = l
k.v = m
k.s = f
k.q = l
k.w = a
k.x = i
i.t = m
h.r = k
h.p = i
h.q = i
h.u = i
h.z = m
h.v = m
h.x = c
l.y = f
l.v = m
f.t = m
c.r = k
c.p = f
c.z = m
c.v = m
c.q = i
c.u = i
c.x = h
a.t = m
a.q = g
a.p = k
assert k.s.t.w.x.r.txt == "k"