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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.u: D = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

g = A("g")
j = B("j")
c = C("c")
f = D("f")
i = E("i")
b = F("b")
h = G("h")
k = H("k")
d = C("d")

g.w = j
g.y = d
j.p = f
j.w = f
j.o = b
j.u = b
j.q = i
j.x = h
j.s = d
c.v = h
f.u = b
f.r = c
i.x = f
i.r = k
i.t = g
b.q = k
b.r = f
h.v = b
k.y = f
k.u = f
k.r = j
k.s = b
k.x = b
d.v = h
assert f.u.q.x.r.r.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: B = None
        self.u: D = None
        self.s: F = None
        self.x: F = None
        self.txt = txt

g = A("g")
j = B("j")
c = C("c")
f = D("f")
i = E("i")
b = F("b")
h = G("h")
k = H("k")
d = C("d")

g.w = j
g.y = d
j.p = f
j.w = f
j.o = b
j.u = b
j.q = i
j.x = h
j.s = d
c.v = h
f.u = b
f.r = c
i.x = f
i.r = k
i.t = g
b.q = k
b.r = f
h.v = b
k.y = f
k.u = f
k.r = j
k.s = b
k.x = b
d.v = h
assert f.u.q.x.r.r.v.v.txt == "b"