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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.y: E = None
        self.s: E = None
        self.p: B = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
j = C("j")
e = D("e")
f = E("f")
l = F("l")
g = B("g")
i = E("i")
k = F("k")

n.t = j
n.y = e
h.o = i
h.y = i
h.s = i
h.w = e
h.p = g
h.t = n
j.p = l
j.y = e
e.y = f
f.y = j
f.r = i
l.u = n
l.z = i
l.s = g
l.v = f
l.w = e
l.r = e
g.o = i
g.w = e
g.y = f
g.s = f
g.p = h
g.t = n
i.y = j
i.r = f
k.u = n
k.z = f
k.v = f
k.s = h
k.w = e
k.r = e
assert e.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: D = None
        self.y: E = None
        self.s: E = None
        self.p: B = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
j = C("j")
e = D("e")
f = E("f")
l = F("l")
g = B("g")
i = E("i")
k = F("k")

n.t = j
n.y = e
h.o = i
h.y = i
h.s = i
h.w = e
h.p = g
h.t = n
j.p = l
j.y = e
e.y = f
f.y = j
f.r = i
l.u = n
l.z = i
l.s = g
l.v = f
l.w = e
l.r = e
g.o = i
g.w = e
g.y = f
g.s = f
g.p = h
g.t = n
i.y = j
i.r = f
k.u = n
k.z = f
k.v = f
k.s = h
k.w = e
k.r = e
assert e.y.y.y.y.txt == "f"