class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.t: D = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.s: D = None
        self.r: I = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.r: I = None
        self.w: C = None
        self.u: B = None
        self.z: F = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.p: E = None
        self.y: G = None
        self.x: F = None
        self.v: B = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.t: D = None
        self.q: D = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.s: D = None
        self.r: I = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.r: I = None
        self.w: C = None
        self.u: B = None
        self.z: F = None
        self.s: A = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: D = None
        self.p: E = None
        self.y: G = None
        self.x: F = None
        self.v: B = None
        self.u: G = None
        self.txt = txt

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

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