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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.x: E = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

g = A("g")
f = B("f")
l = C("l")
k = D("k")
a = E("a")
b = F("b")
d = G("d")
j = H("j")

g.p = d
g.s = j
f.p = a
f.y = b
l.w = j
l.q = g
k.u = l
k.y = d
k.o = f
a.s = d
a.v = j
a.w = j
b.v = d
b.w = d
b.u = d
b.p = g
b.q = k
b.s = a
b.t = f
b.o = l
d.u = k
d.w = b
d.v = g
j.s = a
j.x = a
j.o = a
j.u = b
j.t = f
assert l.w.s.s.u.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.w: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.x: E = None
        self.t: B = None
        self.o: E = None
        self.txt = txt

g = A("g")
f = B("f")
l = C("l")
k = D("k")
a = E("a")
b = F("b")
d = G("d")
j = H("j")

g.p = d
g.s = j
f.p = a
f.y = b
l.w = j
l.q = g
k.u = l
k.y = d
k.o = f
a.s = d
a.v = j
a.w = j
b.v = d
b.w = d
b.u = d
b.p = g
b.q = k
b.s = a
b.t = f
b.o = l
d.u = k
d.w = b
d.v = g
j.s = a
j.x = a
j.o = a
j.u = b
j.t = f
assert l.w.s.s.u.y.w.txt == "b"