class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: D = None
        self.y: G = None
        self.p: B = None
        self.o: E = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.r: D = None
        self.w: C = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.t: F = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.o: F = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: E = None
        self.r: D = None
        self.w: C = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: F = None
        self.t: F = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.o: F = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

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

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