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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.q: G = None
        self.x: A = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.v: B = None
        self.z: F = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.q: G = None
        self.x: A = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.v: B = None
        self.z: F = None
        self.u: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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