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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: G = None
        self.t: E = None
        self.x: G = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.w: G = None
        self.v: G = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: G = None
        self.t: E = None
        self.x: G = None
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.w: G = None
        self.v: G = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.txt = txt

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

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