class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: G = None
        self.q: F = None
        self.v: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: G = None
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.p: G = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.s: E = None
        self.w: B = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

i = A("i")
g = B("g")
b = C("b")
d = D("d")
c = E("c")
k = F("k")
f = G("f")
m = H("m")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: A = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: E = None
        self.p: G = None
        self.w: E = None
        self.y: H = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.p: G = None
        self.q: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: C = None
        self.s: E = None
        self.w: B = None
        self.o: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

i = A("i")
g = B("g")
b = C("b")
d = D("d")
c = E("c")
k = F("k")
f = G("f")
m = H("m")
j = D("j")

i.z = d
i.w = f
i.q = k
i.s = k
i.v = c
g.r = c
g.y = c
g.v = i
g.q = m
b.w = d
b.r = m
d.x = c
d.t = c
d.w = c
d.p = f
d.y = m
d.u = k
c.q = k
c.s = i
c.o = m
k.t = d
k.r = c
k.p = f
k.q = m
k.x = g
f.y = d
f.q = b
f.s = c
f.w = g
f.o = g
f.z = k
m.y = d
m.x = b
m.t = i
j.x = c
j.t = c
j.w = c
j.p = f
j.y = m
j.u = k
assert m.y.y.x.r.txt == "m"