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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.z: H = None
        self.p: F = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: D = None
        self.z: H = None
        self.p: F = None
        self.s: C = None
        self.x: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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