class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: H = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.o: D = None
        self.q: C = None
        self.u: H = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.y: D = None
        self.z: F = None
        self.s: G = None
        self.txt = txt

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

m.v = j
m.q = i
m.u = l
m.t = b
m.r = d
d.u = e
d.w = j
d.q = c
d.v = m
i.o = e
c.u = i
c.q = i
c.o = b
a.z = f
f.s = i
f.q = i
f.r = c
f.o = c
f.u = l
f.z = e
e.u = f
l.z = j
b.v = c
b.y = c
b.t = d
b.z = j
b.s = e
j.s = i
j.q = i
j.r = c
j.o = c
j.u = l
j.z = e
assert f.z.u.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: H = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: D = None
        self.o: D = None
        self.q: C = None
        self.u: H = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.y: D = None
        self.z: F = None
        self.s: G = None
        self.txt = txt

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

m.v = j
m.q = i
m.u = l
m.t = b
m.r = d
d.u = e
d.w = j
d.q = c
d.v = m
i.o = e
c.u = i
c.q = i
c.o = b
a.z = f
f.s = i
f.q = i
f.r = c
f.o = c
f.u = l
f.z = e
e.u = f
l.z = j
b.v = c
b.y = c
b.t = d
b.z = j
b.s = e
j.s = i
j.q = i
j.r = c
j.o = c
j.u = l
j.z = e
assert f.z.u.r.q.txt == "i"