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

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

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

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

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

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

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

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

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

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

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

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

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

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

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