class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.s: B = None
        self.w: F = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.x: E = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
l = B("l")
k = C("k")
f = D("f")
c = E("c")
b = F("b")
a = G("a")
h = F("h")
g = C("g")

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

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

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.s: B = None
        self.w: F = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.x: E = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
l = B("l")
k = C("k")
f = D("f")
c = E("c")
b = F("b")
a = G("a")
h = F("h")
g = C("g")

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