class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.p: F = None
        self.t: E = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

b = A("b")
d = B("d")
n = C("n")
k = D("k")
c = E("c")
e = F("e")
a = G("a")
j = A("j")
i = C("i")
g = C("g")

b.q = c
b.v = c
b.t = c
b.p = e
b.w = d
b.r = k
d.s = b
d.u = n
n.s = c
n.t = k
k.u = c
c.s = g
c.u = d
e.q = c
e.o = g
a.x = e
a.t = e
a.v = d
a.p = d
a.w = c
j.q = c
j.v = c
j.t = c
j.p = e
j.w = d
j.r = k
i.s = c
i.t = k
g.s = c
g.t = k
assert b.r.u.u.s.t.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.p: F = None
        self.t: E = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

b = A("b")
d = B("d")
n = C("n")
k = D("k")
c = E("c")
e = F("e")
a = G("a")
j = A("j")
i = C("i")
g = C("g")

b.q = c
b.v = c
b.t = c
b.p = e
b.w = d
b.r = k
d.s = b
d.u = n
n.s = c
n.t = k
k.u = c
c.s = g
c.u = d
e.q = c
e.o = g
a.x = e
a.t = e
a.v = d
a.p = d
a.w = c
j.q = c
j.v = c
j.t = c
j.p = e
j.w = d
j.r = k
i.s = c
i.t = k
g.s = c
g.t = k
assert b.r.u.u.s.t.u.s.txt == "b"