class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: E = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.v: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

e.r = a
e.t = g
e.y = c
e.v = h
e.z = h
a.y = i
a.p = g
h.v = g
h.r = k
k.t = e
k.r = a
k.q = h
c.v = i
g.x = b
g.o = b
g.r = e
g.v = e
g.t = h
i.y = a
i.p = g
b.r = i
b.t = g
b.y = c
b.v = h
b.z = h
assert k.r.y.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: F = None
        self.y: E = None
        self.v: C = None
        self.z: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.v: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

e.r = a
e.t = g
e.y = c
e.v = h
e.z = h
a.y = i
a.p = g
h.v = g
h.r = k
k.t = e
k.r = a
k.q = h
c.v = i
g.x = b
g.o = b
g.r = e
g.v = e
g.t = h
i.y = a
i.p = g
b.r = i
b.t = g
b.y = c
b.v = h
b.z = h
assert k.r.y.y.y.y.y.txt == "i"