class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: D = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.y: H = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

d = A("d")
e = B("e")
i = C("i")
m = D("m")
f = E("f")
c = F("c")
a = G("a")
h = H("h")
b = E("b")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.y: H = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: E = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

d = A("d")
e = B("e")
i = C("i")
m = D("m")
f = E("f")
c = F("c")
a = G("a")
h = H("h")
b = E("b")
k = D("k")

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