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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.z: H = None
        self.u: C = None
        self.s: G = None
        self.o: H = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: I = None
        self.r: H = None
        self.u: G = None
        self.y: G = None
        self.w: G = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.y: I = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.z: H = None
        self.u: C = None
        self.s: G = None
        self.o: H = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.s: I = None
        self.r: H = None
        self.u: G = None
        self.y: G = None
        self.w: G = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.y: I = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

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

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