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

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

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

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

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

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

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

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

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

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

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

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

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

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

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