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

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

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

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

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

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

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

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

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

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

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

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

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

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

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