class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: B = None
        self.o: D = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.q: F = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.t: A = None
        self.p: B = None
        self.x: B = None
        self.s: C = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
h = D("h")
e = E("e")
d = F("d")
b = E("b")
c = F("c")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: D = None
        self.q: F = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.t: A = None
        self.p: B = None
        self.x: B = None
        self.s: C = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
h = D("h")
e = E("e")
d = F("d")
b = E("b")
c = F("c")

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