class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.p: F = None
        self.y: E = None
        self.q: D = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: F = None
        self.v: D = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

m.t = k
m.v = d
m.p = e
m.u = e
m.y = f
m.q = g
k.p = j
k.v = e
d.y = g
d.w = e
d.q = c
d.s = m
g.y = f
g.v = d
f.u = e
f.y = m
f.r = j
c.u = f
c.o = e
c.v = g
c.w = d
c.p = m
j.p = k
j.v = c
n.p = j
n.v = c
e.u = f
e.o = c
e.v = g
e.w = d
e.p = m
assert e.o.v.v.q.o.p.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.p: F = None
        self.y: E = None
        self.q: D = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: F = None
        self.v: D = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

m.t = k
m.v = d
m.p = e
m.u = e
m.y = f
m.q = g
k.p = j
k.v = e
d.y = g
d.w = e
d.q = c
d.s = m
g.y = f
g.v = d
f.u = e
f.y = m
f.r = j
c.u = f
c.o = e
c.v = g
c.w = d
c.p = m
j.p = k
j.v = c
n.p = j
n.v = c
e.u = f
e.o = c
e.v = g
e.w = d
e.p = m
assert e.o.v.v.q.o.p.v.s.txt == "m"