class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: B = None
        self.p: C = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: B = None
        self.p: C = None
        self.w: E = None
        self.x: A = None
        self.txt = txt

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

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