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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

k.t = h
k.y = e
k.z = m
k.o = j
k.s = j
f.o = h
f.v = i
f.u = m
i.z = g
i.q = g
i.w = k
i.p = e
i.o = f
m.u = e
m.x = j
m.v = f
e.y = f
j.z = i
h.t = k
h.y = e
h.z = g
h.o = j
h.s = j
g.u = e
g.x = j
g.v = f
assert e.y.v.o.txt == "f"