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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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