class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: A = None
        self.x: C = None
        self.y: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.r: B = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.txt = txt

j = A("j")
d = B("d")
e = C("e")
b = D("b")
l = E("l")
a = F("a")
i = G("i")
c = H("c")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: A = None
        self.x: C = None
        self.y: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.r: B = None
        self.u: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.txt = txt

j = A("j")
d = B("d")
e = C("e")
b = D("b")
l = E("l")
a = F("a")
i = G("i")
c = H("c")

j.w = a
d.w = a
d.s = j
d.x = e
d.y = b
d.p = c
d.v = l
e.z = d
e.x = d
e.p = c
b.v = a
l.q = i
l.w = d
l.r = d
l.u = a
l.o = e
a.y = l
i.u = j
c.q = l
c.o = d
assert b.v.y.u.txt == "a"