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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.z: D = None
        self.r: C = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: A = None
        self.z: D = None
        self.r: C = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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