class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.s: E = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.u: A = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
b = D("b")
k = E("k")
l = F("l")
d = A("d")
h = D("h")
i = E("i")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.s: E = None
        self.z: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: C = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: F = None
        self.u: A = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

m = A("m")
j = B("j")
g = C("g")
b = D("b")
k = E("k")
l = F("l")
d = A("d")
h = D("h")
i = E("i")

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