class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.o: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.y: I = None
        self.r: A = None
        self.s: D = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.txt = txt

i = A("i")
h = B("h")
m = C("m")
e = D("e")
f = E("f")
j = F("j")
g = G("g")
b = H("b")
c = I("c")
l = D("l")

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.o: C = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.y: I = None
        self.r: A = None
        self.s: D = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.txt = txt

i = A("i")
h = B("h")
m = C("m")
e = D("e")
f = E("f")
j = F("j")
g = G("g")
b = H("b")
c = I("c")
l = D("l")

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