class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.o: B = None
        self.v: G = None
        self.x: C = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.w: I = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.w: I = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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