class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: G = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.txt = txt

i = A("i")
n = B("n")
b = C("b")
l = D("l")
m = E("m")
d = F("d")
h = G("h")

i.s = b
i.p = h
i.z = h
i.x = l
n.q = h
n.s = h
n.r = d
n.w = m
n.o = i
n.z = l
n.t = b
b.y = l
b.t = l
b.p = m
b.s = i
b.w = h
b.o = h
b.z = d
l.q = d
l.r = d
l.u = d
l.o = n
l.t = i
m.w = l
m.t = d
d.z = h
d.s = h
d.u = b
h.x = i
h.p = d
assert i.x.r.u.w.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: G = None
        self.x: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.txt = txt

i = A("i")
n = B("n")
b = C("b")
l = D("l")
m = E("m")
d = F("d")
h = G("h")

i.s = b
i.p = h
i.z = h
i.x = l
n.q = h
n.s = h
n.r = d
n.w = m
n.o = i
n.z = l
n.t = b
b.y = l
b.t = l
b.p = m
b.s = i
b.w = h
b.o = h
b.z = d
l.q = d
l.r = d
l.u = d
l.o = n
l.t = i
m.w = l
m.t = d
d.z = h
d.s = h
d.u = b
h.x = i
h.p = d
assert i.x.r.u.w.p.u.txt == "b"